#ifndef __RENDER_STATE_H__
#define __RENDER_STATE_H__

#include "Object.h"
#include "RenderState.mcr"

class RenderState : public Object
{
public:
	enum Type
	{
		RS_ALPHA,
		RS_DITHER,
		RS_FOG,
		RS_LIGHT,
		RS_MATERIAL,
		RS_SHADE,
		RS_TEXTURE,
		RS_VERTEXCOLOR,
		RS_WIREFRAME,
		RS_ZBUFFER,
		RS_MAX_STATE
	};

	enum { RS_NUM = RS_MAX_STATE* sizeof( RenderState* ) };

	virtual Type get_type() const = 0;
	virtual void update( RenderState*& old_state );
	virtual void restore( RenderState* old_state );
	virtual RenderState* copy();

	class List
	{
	public:
		RenderStatePtr m_pstate;
		List* next;
	};

	static RenderState** get_default_states() { return ap_default; }

protected:
	RenderState();
	virtual ~RenderState();

	static RenderState* ap_default[RS_MAX_STATE];
};

#endif

